#include "notice.h"
#include "ui_notice.h"

notice::notice(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::notice)
{
    warranty.append("qt-aprs is distributed in the hope that it will be useful,");
    warranty.append("but WITHOUT ANY WARRANTY; without even the implied warranty of");
    warranty.append(" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the ");
    warranty.append("GNU General Public License for more details.");
    usage.append("qt-aprs is free software: you can redistribute it and/or modify");
    usage.append(" it under the terms of the GNU General Public License as published by");
    usage.append(" the Free Software Foundation, either version 3 of the License, or");
    usage.append(" (at your option) any later version.");

    ui->setupUi(this);

    connect(ui->Warranty, SIGNAL(clicked()),this,SLOT(displayWarranty()));
    connect(ui->Details,SIGNAL(clicked()),this,SLOT(displayUsage()));
}

notice::~notice()
{
    delete ui;
}

void notice::displayUsage()
{
    ui->textBrowser->setPlainText(usage.toAscii());
}

void notice::displayWarranty()
{
    ui->textBrowser->setPlainText(warranty.toAscii());
}
